/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.googlecode.flealancemarket.service.commands.impl;

import com.googlecode.flealancemarket.metamodel.User;
import com.googlecode.flealancemarket.service.commands.CountSentMessagesForUser;
import com.googlecode.flealancemarket.service.facades.MessagesFacade;

/**
 *
 * @author vanja
 */
public class CountSentMessagesForUserImpl implements CountSentMessagesForUser {

    private User user;
    private MessagesFacade facade;

    public void setUser(User user) {
        this.user = user;
    }

    public int execute() {
        return facade.countSentMessages(user);
    }

    public void setFacade(MessagesFacade facade){
        this.facade = facade;
    }

}
